I like it very much;
5. HAProxy supports virtual hosts.
The following describes how to use Haproxy as the Server Load balancer:Current Environment:
Ubuntu16.04 + Haproxy 192.168.93.21Centos6 + httpd 192.168.93.5Centos6 + httpd 192.168.93.7
Haproxy configuration file
Vi/etc/haproxy
displayed after haproxy is started, this is the same as the "-q" parameter added when the command line starts haproxy # quiet # defines the location where statistics are stored. stats socket/usr/local/haproxy/stats # default ults # default mode [tcp: layer 4; http: Layer 7;
Rotten mud: TCP application for learning haproxy with high load balancing, and load balancing haproxy
This document consistsIlanniwebProviding friendship sponsorship, first launchedThe world
In the previous articles, we introduced the configuration parameters of haproxy, And the configuration examples are all http protocol (layer-7 Application.
This article int
Install the haproxy and haproxy commands and the haproxy commands
Directory:1. Install haproxy2. haproxy command
1. Install haproxy
CentOS comes with haproxy, but the version may be old. You can find the latest stable version of
记录健康检查的日志信息 Option Httpclose # # #每次请求完毕后主动关闭http通道 Option Httplog # # #日志类别http日志格式 Option Forwardfor # # #如果后端服务器需要获得客户端真实ip需要配置的参数, you can get the client IP from the HTTP header Option Redispatch # # #serverId对应的服务器挂掉后, force directed to other healthy servers timeout connect10000#default TenSecond timeoutifA backend isNot found timeout client300000# # #客户端连接超时 Timeout Server300000# # #服务器连接超时 Maxconn60000# # #最大连接数 Retries3# # #3次连接失败就认为服务不可用, you can also set ##########################
/haproxy. pid maxconn 4000 user haproxy group haproxy daemon # turn on stats unix socket stats socket/var/lib/haproxy/stats # response # common defaults that all the 'listen' and 'backe
Memcache-command-stats, memcache -- stats
Curr_items # Number of cached objects in the current cache total_items # indicates that the system has stored the data of all objects since the cache service was started, including the number of accumulated data retrieved from the deleted object pai_get # in the cache. After a get operation is executed, 11__set is added. # The accumulative data entries are saved,
-alive10s #默认持久连接超时时间 #timeout http-request 10s #默认http请求超时时间 #timeout queue 1m #默认队列超时时间 balance Roundrobin # Set the default load Balancing mode, polling mode #balance source #设置默认负载均衡方式, similar to Nginx ip_hash #balnace leastconn #设置默认负载均衡方式, minimum number of connections ####### #统计页面配置 ##### ### Listen stats bind 0.0.0.0:1080 #设置Frontend和Backend的组合体, name of the monitor group, customize the name as needed mode HTTP #http的7层模式 option Httplog #采用h
Tags: percona xtradb cluster Sysbench haproxyXtradb after the cluster deployment is complete, 3 machine can read and write at the same time, it needs to be built in front Haproxy For load Balancing. official website haproxy Configuration reference address:Https://www.percona.com/doc/percona-xtradb-cluster/5.6/howtos/virt_sandbox.htmlHaproxy Server Configurationtake a machine as a
-1.4.8.tar.gz
Cd haproxy-1.4.8
Make TARGET = linux26; make install
# Here you can also write make TARGET = linux26 -- prefix =/usr/local/haproxy to add a path for haproxy installation.
Write the haproxy Configuration File. the master and slave files are the same. use this configuration file [plain] view plaincopyprint?
真实ip需要配置的参数, you can obtain client IP option Redispatch from the HTTP header #当serverid对应的服务器挂掉后 , force directed to the other health server Retries 2 #2次连接失败就认为服务器不可用, mainly through the subsequent check check Maxconn 2000#最大连接数 balance roundrobin #负载均衡算法 stats uri/haproxy-stats access address for the #haproxy
://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.24.tar.gz Tar xf haproxy-1.4.24.tar.gz cd haproxy-1.4.24 view ubuntu version info: uname-a display: linux ubuntu37 3.2.0-51-generic # 77-Ubuntu SMP Wed Jul 24 20:18:19 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux make TARGET = 37-ubuntu make PREFIX =/usr/local/
Describe
Baidu statistics component, used to statistic page data
Type
General
Support layout
N/s
The required script
Https://mipcache.bdstatic.com/static/v1/mip-stats-baidu/mip-stats-baidu.js
Example
MIP provides Baidu statistics plug-in, easy to analyze page data, need to advance to Baidu statistics here to create a site, will automatically g
(current_date (), Interval 1 day) = substr (a.user_create_time,1, 10);SELECT Count (*) as Num from Xm_feed a WHERE date_sub (current_date (), Interval 1 day) = substr (a.feed_publish_time,1, 10);SELECT Count (*) as Num from Xm_feed_comment a WHERE date_sub (current_date (), Interval 1 day) = substr (a.comm_create_time,1, 10);SELECT Count (*) as Num from Xm_feed_repost a WHERE date_sub (current_date (), Interval 1 day) = substr (a.repost_create_time,1 , 10);SELECT Count (*) as Num from Xm_feed_d
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.